<template>
  <div class="login-container">
    <div class="login-form">
      <h2 class="form-title">用户登录</h2>
      <form>
        <div class="form-group">
          <label for="username"><i class="fas fa-user"></i></label>
          <input type="text" id="username" placeholder="请输入用户名" />
        </div>
        <div class="form-group">
          <label for="password"><i class="fas fa-lock"></i></label>
          <input type="password" id="password" placeholder="请输入密码" />
        </div>
        <button type="button" @click="btn" class="btn-login">登录</button>
      </form>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Login',
  data () {
    return {

    }
  },
  methods: {
    btn () {
      this.$router.push('/layout')
    }
  }
}
</script>

<style lang='less' scoped>
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: #f8f8f8;
}

.login-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
  background-color: #ffffff;
}

.form-title {
  font-size: 1.8rem;
  margin-bottom: 2rem;
}

.form-group {
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 1.5rem;
}

.form-group label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  font-size: 1.2rem;
  color: #777777;
  border-radius: 50%;
  background-color: #f8f8f8;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}

.form-group input {
  flex: 1;
  height: 3rem;
  padding-left: 1rem;
  border: none;
  background-color: #f8f8f8;
}

.btn-login {
  margin-top: 2rem;
  width: 12rem;
  height: 3rem;
  color: #ffffff;
  background-color: #007bff;
  border: none;
  border-radius: 1.5rem;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-login:hover {
  background-color: #0069d9;
}
</style>